package processor.procurement;

import junit.framework.TestCase;
import model.payment.Payment;
import model.payment.PointPayment;
import model.procurement.ProcurementContent;
import model.user.User;

public class DefectedcustomersTest2 extends TestCase {
    private PointsExchange pointsExchange;

    @Override
    protected void setUp() {
        pointsExchange = new PointsExchange();}

    // 测试触发潜在客户提示的场景
    public void testPotentialCustomerCase() {
        // 准备测试数据
        pointsExchange.setUser(new User("小黑"));
        pointsExchange.setPayment(new Payment(new PointPayment(), 190));
        ProcurementContent content = new ProcurementContent("猫粮", "三箱");

        // 执行测试
        String result = pointsExchange.pointExchange(content);

        // 验证结果
        assertEquals("小黑在积分兑换页面使用积分兑换了三箱猫粮，花费190积分", result);
    }
}